﻿<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>倒计时</title>
  <script type="text/javascript">
    var time = 10;
    function askTim(){
      var obj = document.getElementById("ag");
      if(time > 0){
        obj.value = "【我同意"+time+"】";
        obj.disabled = true;
        time--;
        setTimeout("askTime()", 1000);
      }else{
        obj.value ="[我同意]";
        obj.disabled = false;
      }
    }
  </script>
</head>
<body onload="askTim()">
  <input type="button" value="[我同意10]" id="ag" disabled>
</body>
</html>